<template>
  <keep-alive :key="$route.fullPath" :include="keepAliveArr">
    <router-view v-if="RouterState"></router-view>
  </keep-alive>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name: 'Layout',
  computed: {
    ...mapGetters(['keepAliveArr']),
  },
  provide() {
    return {
      reload: this.reload,
    }
  },
  data() {
    return {
      RouterState: true,
    }
  },
  methods: {
    reload() {
      this.RouterState = false
      this.$nextTick(() => {
        this.RouterState = true
      })
    },
  },
}
</script>

<style>
</style>